<?php
	require_once('session.php');
		
	//Check whether the session variable SESS_USER_TYPE is present or not
	if(!isset($_SESSION['SESS_USER_TYPE']) ) { 
			header("location: ../auth/access-denied.php");
			exit();	
	} else { // session user type IS set
		
		if($home_title == "Administrator" && $_SESSION['SESS_USER_TYPE']!=0){
			header("location: ../auth/access-denied.php");
			exit();	
		}
		
		if($home_title == "Volunteer" && $_SESSION['SESS_USER_TYPE']!=1){
			header("location: ../auth/access-denied.php");
			exit();	
		}
		
		if($home_title == "Adoptive Family" && $_SESSION['SESS_USER_TYPE']!=2){
			header("location: ../auth/access-denied.php");
			exit();	
		}
		

	}

?>	

